package com.im.dynamic.config;

import com.qiniu.storage.Region;
import com.qiniu.storage.UploadManager;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class QiniuYunConfig {

    // 给IOC容器中放一个UploadManager
    @Bean
    public UploadManager uploadManager(){
        com.qiniu.storage.Configuration cfg = new com.qiniu.storage.Configuration(Region.region2());
        UploadManager uploadManager = new UploadManager(cfg);
        return uploadManager;
    }

}